package com.kool.kadmin.system.dao;

import com.kool.kadmin.system.bean.SysCounterDo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author luyu
 */
public interface SysCounterDao {
    SysCounterDo getAndLock(@Param("cntCode") String cntCode);

    int updateNext(SysCounterDo counterDo);

    SysCounterDo getCounterByCode(@Param("cntCode") String cntCode);

    int insert(SysCounterDo counterDo);

    int updateById(SysCounterDo counterDo);

    int deleteById(@Param("id") Long id);

    int countTotal(SysCounterDo counterDo);

    List<SysCounterDo> getPage(@Param("cntCode") String cntCode, @Param("cntName") String cntName, @Param("offset") int offset, @Param("rows") int rows);
}
